package db.dto;

import java.io.Serializable;

public class IntakeDto implements Serializable, AbstractDto
{
	/** 
	 * This attribute maps to the column ID_DOCTOR in the INTAKE table.
	 */
	protected int idDoctor;

	/** 
	 * This attribute maps to the column ID_PATIENT in the INTAKE table.
	 */
	protected int idPatient;

	/** 
	 * This attribute represents whether the primitive attribute idPatient is null.
	 */
	protected boolean idPatientNull = true;

	/** 
	 * This attribute maps to the column PRIORITY in the INTAKE table.
	 */
	protected int priority;

	/** 
	 * This attribute represents whether the primitive attribute priority is null.
	 */
	protected boolean priorityNull = true;

	/** 
	 * This attribute maps to the column DATEOFINTAKE in the INTAKE table.
	 */
	protected long dateofintake;

	/** 
	 * This attribute represents whether the primitive attribute dateofintake is null.
	 */
	protected boolean dateofintakeNull = true;

	/** 
	 * This attribute maps to the column COMMENT in the INTAKE table.
	 */
	protected String comment;

	/** 
	 * This attribute maps to the column ID_INTAKE in the INTAKE table.
	 */
	protected int idIntake;

	/**
	 * Method 'IntakeDto'
	 * 
	 */
	public IntakeDto()
	{
	}

    public int getId() {
        return this.idIntake;
    }

    /**
	 * Method 'getIdDoctor'
	 * 
	 * @return int
	 */
	public int getIdDoctor()
	{
		return idDoctor;
	}

	/**
	 * Method 'setIdDoctor'
	 * 
	 * @param idDoctor
	 */
	public void setIdDoctor(int idDoctor)
	{
		this.idDoctor = idDoctor;
	}

	/**
	 * Method 'getIdPatient'
	 * 
	 * @return int
	 */
	public int getIdPatient()
	{
		return idPatient;
	}

	/**
	 * Method 'setIdPatient'
	 * 
	 * @param idPatient
	 */
	public void setIdPatient(int idPatient)
	{
		this.idPatient = idPatient;
		this.idPatientNull = false;
	}

	/**
	 * Method 'setIdPatientNull'
	 * 
	 * @param value
	 */
	public void setIdPatientNull(boolean value)
	{
		this.idPatientNull = value;
	}

	/**
	 * Method 'isIdPatientNull'
	 * 
	 * @return boolean
	 */
	public boolean isIdPatientNull()
	{
		return idPatientNull;
	}

	/**
	 * Method 'getPriority'
	 * 
	 * @return int
	 */
	public int getPriority()
	{
		return priority;
	}

	/**
	 * Method 'setPriority'
	 * 
	 * @param priority
	 */
	public void setPriority(int priority)
	{
		this.priority = priority;
		this.priorityNull = false;
	}

	/**
	 * Method 'setPriorityNull'
	 * 
	 * @param value
	 */
	public void setPriorityNull(boolean value)
	{
		this.priorityNull = value;
	}

	/**
	 * Method 'isPriorityNull'
	 * 
	 * @return boolean
	 */
	public boolean isPriorityNull()
	{
		return priorityNull;
	}

	/**
	 * Method 'getDateofintake'
	 * 
	 * @return long
	 */
	public long getDateofintake()
	{
		return dateofintake;
	}

	/**
	 * Method 'setDateofintake'
	 * 
	 * @param dateofintake
	 */
	public void setDateofintake(long dateofintake)
	{
		this.dateofintake = dateofintake;
		this.dateofintakeNull = false;
	}

	/**
	 * Method 'setDateofintakeNull'
	 * 
	 * @param value
	 */
	public void setDateofintakeNull(boolean value)
	{
		this.dateofintakeNull = value;
	}

	/**
	 * Method 'isDateofintakeNull'
	 * 
	 * @return boolean
	 */
	public boolean isDateofintakeNull()
	{
		return dateofintakeNull;
	}

	/**
	 * Method 'getComment'
	 * 
	 * @return String
	 */
	public String getComment()
	{
		return comment;
	}

	/**
	 * Method 'setComment'
	 * 
	 * @param comment
	 */
	public void setComment(String comment)
	{
		this.comment = comment;
	}

	/**
	 * Method 'getIdIntake'
	 * 
	 * @return float
	 */
	public int getIdIntake()
	{
		return idIntake;
	}

	/**
	 * Method 'setIdIntake'
	 * 
	 * @param idIntake
	 */
	public void setIdIntake(int idIntake)
	{
		this.idIntake = idIntake;
	}

	/**
	 * Method 'equals'
	 * 
	 * @param _other
	 * @return boolean
	 */
	public boolean equals(Object _other)
	{
		if (_other == null) {
			return false;
		}
		
		if (_other == this) {
			return true;
		}
		
		if (!(_other instanceof IntakeDto)) {
			return false;
		}
		
		final IntakeDto _cast = (IntakeDto) _other;
		if (idDoctor != _cast.idDoctor) {
			return false;
		}
		
		if (idPatient != _cast.idPatient) {
			return false;
		}
		
		if (idPatientNull != _cast.idPatientNull) {
			return false;
		}
		
		if (priority != _cast.priority) {
			return false;
		}
		
		if (priorityNull != _cast.priorityNull) {
			return false;
		}
		
		if (dateofintake != _cast.dateofintake) {
			return false;
		}
		
		if (dateofintakeNull != _cast.dateofintakeNull) {
			return false;
		}
		
		if (comment == null ? _cast.comment != comment : !comment.equals( _cast.comment )) {
			return false;
		}
		
		if (idIntake != _cast.idIntake) {
			return false;
		}
		
		return true;
	}

	/**
	 * Method 'hashCode'
	 * 
	 * @return int
	 */
	public int hashCode()
	{
		int _hashCode = 0;
		_hashCode = 29 * _hashCode + idDoctor;
		_hashCode = 29 * _hashCode + idPatient;
		_hashCode = 29 * _hashCode + (idPatientNull ? 1 : 0);
		_hashCode = 29 * _hashCode + priority;
		_hashCode = 29 * _hashCode + (priorityNull ? 1 : 0);
		_hashCode = 29 * _hashCode + (int) (dateofintake ^ (dateofintake >>> 32));
		_hashCode = 29 * _hashCode + (dateofintakeNull ? 1 : 0);
		if (comment != null) {
			_hashCode = 29 * _hashCode + comment.hashCode();
		}
		
		_hashCode = 29 * _hashCode + Float.floatToIntBits(idIntake);
		return _hashCode;
	}

    /**
	 * Method 'toString'
	 * 
	 * @return String
	 */
	public String toString()
	{
		StringBuffer ret = new StringBuffer();
		ret.append( "db.dto.IntakeDto: " );
		ret.append( "idDoctor=" + idDoctor );
		ret.append( ", idPatient=" + idPatient );
		ret.append( ", priority=" + priority );
		ret.append( ", dateofintake=" + dateofintake );
		ret.append( ", comment=" + comment );
		ret.append( ", idIntake=" + idIntake );
		return ret.toString();
	}

}
